package user;

import operation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2022-08-23
 * Time: 21:12
 * name: 普通用户
 */
public class RegularUsers extends User{

    public RegularUsers(String name) {
        super(name);

        this.iOperations = new IOperation[]{
                new ExitOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }

    public int menu(){
        System.out.println("----------------------------------");
        System.out.println("你好！ "+name+"用户，已进入图书系统！");
        System.out.println("1. 查找图书 2. 借阅图书 ");
        System.out.println("3. 归还图书 0. 退出系统 ");
        System.out.println("----------------------------------");

        Scanner scanner = new Scanner(System.in);
        int choose = scanner.nextInt();
        return choose;
    }
}
